package NewCoder;

public class BM69 {
    public int solve (String nums) {
        // write code here
        int[] dp = new int[nums.length() + 1];
        dp[0]=1;
        for (int i = 1; i <= nums.length(); i++) {
            if (nums.charAt(i - 1) != '0') {
                dp[i] += dp[i - 1];
            }
            if (i > 1 && nums.charAt(i - 2) != '0' && ((nums.charAt(i - 2) - '0') * 10 + (nums.charAt(i - 1) - '0') <= 26)) {
                dp[i] += dp[i - 2] ;
            }
        }
        return dp[nums.length()];
    }
}
